//package com.lsyw.intergrate.config;
//
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
//
///**
// * @Author: shaozheng
// * @Date: 2021/8/24 12:04
// * @Version 1.0
// */
//@Configuration
//public class ThreadPoolConfig {
//    @Bean
//    public ThreadPoolTaskExecutor taskExecutor() {
//        ThreadPoolTaskExecutor pool = new ThreadPoolTaskExecutor();
//        // 线程池维护线程的最少数量
//        pool.setCorePoolSize(5);
//        // 线程池维护线程的最大数量
//        pool.setMaxPoolSize(2000);
//        // 当调度器shutdown被调用时等待当前被调度的任务完成
//        pool.setWaitForTasksToCompleteOnShutdown(true);
//        return pool;
//    }
//}
//
